package com.deo;

import com.opensymphony.xwork2.ActionSupport;

public class DEOFormAction extends ActionSupport{
	private String name;
	private String address;
	private String city;
	private String district;
	private String state;
	private String country;
	private String zipcode;
	private  String contact;
	private String role;

	public String getRole() {
		return role;
	}

	public void setRole(String role) {
		this.role = role;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getZipcode() {
		return zipcode;
	}

	public void setZipcode(String zipcode) {
		this.zipcode = zipcode;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getDistrict() {
		return district;
	}

	public void setDistrict(String district) {
		this.district = district;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getContact() {
		return contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}
	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		DEOdata deoData = getDeoDataMap();
		DEODataSubmit deoDataSubmit = new DEODataSubmit();
		String status=deoDataSubmit.dataEntery(deoData);
		return status;
	}
	
	public DEOdata getDeoDataMap(){
		DEOdata deOdata = new DEOdata();
			deOdata.setName(name);
			deOdata.setAddress(address);
			deOdata.setCity(city);
			deOdata.setDistrict(district);
			deOdata.setState(state);
			deOdata.setCountry(country);
			deOdata.setZipcode(zipcode);
			deOdata.setContact(contact);
		return deOdata;		
	}
}
